<template>
  <el-breadcrumb separator="/">
    <el-breadcrumb-item v-for="( item) in lists" :key="item.path">
      <router-link :to="item.path">{{item.meta.title}}</router-link>
    </el-breadcrumb-item>
  </el-breadcrumb>
</template>

<script>

export default {
  data() {
    return {
      lists: []
    }
  },
  created() {
    this.lists = this.$route.matched //获取路由内的全部信息
  },
  watch: {
    $route(to, from) {
      this.lists = to.matched
    }
  },
  methods: {}
}
</script>

<style scoped>
</style>